run(); if ( ! defined( 'SHAPEDPLIUGIN_OFFER_BANNER_LOADED' ) ) { define( 'SHAPEDPLIUGIN_OFFER_BANNER_LOADED', true ); /** * The class responsible for generating admin offer banner. */ include_once plugin_dir_path( __FILE__ ) . '/admin/partials/class-wgs-offer-banner.php'; } } if ( ! function_exists( 'is_plugin_active_for_network' ) ) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } if ( ( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) && ! ( is_plugin_active( 'woo-gallery-slider-pro/woo-gallery-slider-pro.php' ) || is_plugin_active_for_network( 'woo-gallery-slider-pro/woo-gallery-slider-pro.php' ) ) ) { if ( ! is_network_admin() ) { run_woo_gallery_slider(); } } /** * Declare this plugin is compatible with WooCommerce HPOS feature. */ add_action( 'before_woocommerce_init', function () { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } ); /** * Show admin notice if WooCommerce is not activated. * * @since 1.0.0 */ function wcgs_wc_admin_notice() { if ( ! class_exists( 'WooCommerce' ) ) { $link = esc_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'woocommerce', 'TB_iframe' => 'true', 'width' => '640', 'height' => '500', ), admin_url( 'plugin-install.php' ) ) ); $outline = '

' . wp_kses_post( 'You must install and activate WooCommerce plugin to make the WooGallery work.', 'gallery-slider-for-woocommerce' ) . '

'; echo wp_kses_post( $outline ); } } add_action( 'admin_notices', 'wcgs_wc_admin_notice' );